import 'package:flutter_test/flutter_test.dart';
import 'package:image_gallery_saver_huawei/image_gallery_saver_huawei.dart';
import 'package:image_gallery_saver_huawei/image_gallery_saver_huawei_platform_interface.dart';
import 'package:image_gallery_saver_huawei/image_gallery_saver_huawei_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockImageGallerySaverHuaweiPlatform
    with MockPlatformInterfaceMixin
    implements ImageGallerySaverHuaweiPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final ImageGallerySaverHuaweiPlatform initialPlatform = ImageGallerySaverHuaweiPlatform.instance;

  test('$MethodChannelImageGallerySaverHuawei is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelImageGallerySaverHuawei>());
  });

  test('getPlatformVersion', () async {
    ImageGallerySaverHuawei imageGallerySaverHuaweiPlugin = ImageGallerySaverHuawei();
    MockImageGallerySaverHuaweiPlatform fakePlatform = MockImageGallerySaverHuaweiPlatform();
    ImageGallerySaverHuaweiPlatform.instance = fakePlatform;

    expect(await imageGallerySaverHuaweiPlugin.getPlatformVersion(), '42');
  });
}
